package com.sanjiahantang.youjiaclient.module.common.beans;


import com.google.gson.Gson;
import com.sanjiahantang.youjiaclient.base.BaseBean;
import com.sanjiahantang.youjiaclient.module.cases.beans.CaseBean;
import com.sanjiahantang.youjiaclient.module.match.beans.MatchBean;
import com.sanjiahantang.youjiaclient.module.match.beans.MatchListBean;
import com.sanjiahantang.youjiaclient.module.store.beans.StoreBean;

import java.util.List;

/**
 * Created by zy on 2017/9/29.
 */

public class HomeBean extends BaseBean {


    private String data;

    public Data getData() {
        try{
            return new Gson().fromJson(data,Data.class);
        }catch (Exception e){
            return null;
        }
    }

    public void setData(String data) {
        this.data = data;
    }

    public static class Data{

        /**
         *
         * {
         "advertisementList": [
         {
         "linkLocation": "www.baidu.com",
         "advertisementTitle": "测试",
         "url": "upload/2017/10/13\\60a29c13ee543c5e638aca1b76869987.jpg",
         "scaId": 16
         },
         {
         "linkLocation": "www.baidu.com",
         "advertisementTitle": "龙王",
         "url": "upload/2017/10/13\\timg.jpg",
         "scaId": 17
         },
         {
         "linkLocation": "www.baidu.com",
         "advertisementTitle": "11111111111111",
         "url": "upload/2017/10/13\\u=2760457749,4161462131&fm=27&gp=0.jpg",
         "scaId": 18
         }
         ],
         "caseList": [
         {
         "residentialName": "案例测试",
         "userName": "张三"
         }
         ],
         "experienceList": [
         {
         "distance": 5940.046879446547,
         "isExperience": 1,
         "createTime": "2017-09-25T06:24:53.000+0000",
         "experienceAddressDetail": "广开大街13号附近",
         "roleId": "15620560524",
         "isExperienceStatus": 2,
         "experienceName": "有家体验店",
         "lon": 117.176198,
         "updateTime": "2017-09-26T08:46:09.000+0000",
         "experienceAddress": "天津市 南开区",
         "id": 1,
         "lat": 39.142549
         }
         ],
         "togeterList": [
         {
         "imgUrl": [
         {
         "mgiId": 1086,
         "goodsName": "跳跳沙发",
         "basePrice": 333
         },
         {
         "mgiId": 1085,
         "goodsName": "施工服务费",
         "basePrice": 333
         },
         {
         "mgiId": 1078,
         "goodsName": "吊灯",
         "basePrice": 22
         },
         {
         "mgiId": 1082,
         "goodsName": "坐便器",
         "basePrice": 333
         }
         ],
         "subjectsName": "这是测试搭配",
         "mgtiId": 105,
         "url": "upload/2017/10/11\\u=1267607011,2727279265&fm=214&gp=0.jpg"
         },
         {
         "imgUrl": [],
         "subjectsName": "地板",
         "mgtiId": 8
         },
         {
         "imgUrl": [],
         "subjectsName": "测试",
         "mgtiId": 9
         }
         ]
         }
         */
        private List<Menu> menu;

        private List<Advertise> advertisementList;

        private List<CaseBean.Item> caseList;

        private List<StoreBean.Item> experienceList;

        private List<MatchListBean.Detail> togeterList;

        public List<Menu> getMenu() {
            return menu;
        }

        public void setMenu(List<Menu> menu) {
            this.menu = menu;
        }

        public List<Advertise> getAdvertisementList() {
            return advertisementList;
        }

        public void setAdvertisementList(List<Advertise> advertisementList) {
            this.advertisementList = advertisementList;
        }

        public List<CaseBean.Item> getCases() {
            return caseList;
        }

        public void setCases(List<CaseBean.Item> cases) {
            this.caseList = cases;
        }

        public List<StoreBean.Item> getStores() {
            return experienceList;
        }

        public void setStores(List<StoreBean.Item> stores) {
            this.experienceList = stores;
        }

        public List<MatchListBean.Detail> getMatches() {
            return togeterList;
        }

        public void setMatches(List<MatchListBean.Detail> matches) {
            this.togeterList = matches;
        }
    }

    public static class Menu {

        private int id;

        private String menu_name;

        private String menu_img;

        private String menu_url;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getMenu_name() {
            return menu_name;
        }

        public void setMenu_name(String menu_name) {
            this.menu_name = menu_name;
        }

        public String getMenu_img() {
            return menu_img;
        }

        public void setMenu_img(String menu_img) {
            this.menu_img = menu_img;
        }

        public String getMenu_url() {
            return menu_url;
        }

        public void setMenu_url(String menu_url) {
            this.menu_url = menu_url;
        }

    }

    public static class Advertise {

        private String url;
        private String linkLocation;
        private String advertisementTitle;
        private int scaId;

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public String getLinkLocation() {
            return linkLocation;
        }

        public void setLinkLocation(String linkLocation) {
            this.linkLocation = linkLocation;
        }

        public String getAdvertisementTitle() {
            return advertisementTitle;
        }

        public void setAdvertisementTitle(String advertisementTitle) {
            this.advertisementTitle = advertisementTitle;
        }

        public int getScaId() {
            return scaId;
        }

        public void setScaId(int scaId) {
            this.scaId = scaId;
        }
    }
}
